package xyz.xuanlee.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import xyz.xuanlee.springcloud.entities.CommonResult;
import xyz.xuanlee.springcloud.entities.Payment;

@Service
@FeignClient("CLOUD-PAYMENT-SERVICE")
public interface PaymentService {

    @GetMapping("/payment/getPayment/{id}")
    CommonResult<Payment> getById(@PathVariable("id") Long id);

    @GetMapping("/feign/timeout")
    CommonResult<String> feignTimeout();
}
